package com.tensquare.search.pojo;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

import java.io.Serializable;

/**
 * @Auther: hjk
 * @Date: 2019/6/21 00:39
 * @Description:
 */
@Data
@Document(indexName = "tensquare_article",type ="article" )
public class Article implements Serializable{

    @Id
    private String id;
    /** 标题 */
    //是否索引，就是看该域是否被搜索，
    // 是否分词，表示搜索的时候是否整体匹配还是单个匹配
    // 是否存储，是否在页面显示
    @Field(index = true,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String title;
    /** 内容 */
    @Field(index = true,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String content;
    /** 审核状态 */
    private String state;

}
